import Vue from 'vue';
import VueFileUpload from './fileUpload.vue';

const FileUpload = Vue.extend(VueFileUpload);
/**
 * fileUpload上传文件
 * 
 * @param type 类型 image、audio、video、file
 * @param count 数量
 * @param callback 回调
 */
const fileUpload = (options) => {
    // 实例
    const instance = new FileUpload();
    instance.vm = instance.$mount();
    document.body.appendChild(instance.vm.$el);
    // 赋值
    instance.type = options.type;
    instance.count = options.count;
    instance.callback = options.callback;
}

export default fileUpload